# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-django-jinja
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=django-jinja
pkgver=2.11.0
pkgrel=1
pkgdesc="Simple and nonobstructive jinja2 integration with Django"
url="https://pypi.python.org/project/django-jinja"
arch="noarch"
license="BDS-3-Clause"
depends="
	py3-django
	py3-jinja2
	"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
source="$pkgname-$pkgver.tar.gz::https://github.com/niwinz/django-jinja/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 ./testing/runtests.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
853eebda8a7eb11d35126c1d116b81490c81029e7649a6c5aa1598d7b11e3e0831283f0f56d8d1bdfe683ec1b18d777c3216ceb130f9658341c464531664da32  py3-django-jinja-2.11.0.tar.gz
"
